import { ITableParams } from "@/utils/types/table.ts";
import { ITableData as ITableDataDept } from "../dept/types.ts";

export interface IUserTableParams extends ITableParams {
  startTime?: string;
  endTime?: string;
  deptId?: number;
  userName?: string;
  phonenumber?: string;
}
export interface ITableData {
  userId: number;
  userName: string;
  dept: ITableDataDept;
  status: string;
  phonenumber: string;
  createTime: string;
  deptId: number;
  remark: string;
}
export interface ITypeState {
  tableData: ITableData[];
  loading: boolean;
  total: number;
}

export interface IFormState {
  phonenumber: string;
  userName: string;
  roleIds: Array<string | number>;
  password: string;
  status: string;
  deptId: number | null;
  remark: string;
  userId: number | null;
}

export type FormStateKeys = keyof IFormState;

export interface ITreeSelectData {
  label: string;
  id: number;
  children?: ITreeSelectData[];
}

export interface IStateAdd {
  deptTreeData: ITreeSelectData[];
}

export interface IUserInfo {
  roleIds: Array<string | number>;
}

export interface IResetPwdState {
  userId: number;
  password: string;
}
